package org.hzandyy.framework.liteflow.context;

import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import lombok.extern.slf4j.Slf4j;

/**
 * @author hz
 * @since 2023/12/8 10:54
 */
@LiteflowComponent("node_context_1")
@Slf4j
public class Context1Cmp extends NodeComponent {

    @Override
    public void process() throws Exception {
        log.info("node context 1");

        Object requestData = this.getRequestData();
        if (null != requestData) {
            if (requestData instanceof ReqData reqData) {
                log.info("request data: '{}'", reqData);
            }
        }

    }

}